#!/bin/sh

. /etc/rc.common

OBSR_HOME="/Applications/AhsayOBS and AhsayRPS"

export OBSR_HOME

StartService ()
{
    ConsoleMessage "Start Ahsay Offsite Backup Server and Replication Server"
    cd "${OBSR_HOME}/bin"
    sh ./startup.sh
}

StopService ()
{
    ConsoleMessage "Stop Ahsay Offsite Backup Server and Replication Server"
    cd "${OBSR_HOME}/bin"
    sh ./shutdown.sh
    sleep 10;
}

RestartService ()
{
    StopService;
    StartService;
}

RunService "$1"
